import request from "@/utils/request";
import type {Result} from "@/types/common/Result";
import type {UserVO} from "@/types/vo/UserVO";

/**
 * 获取消息用户列表
 * @returns
 */
export function getMessageUserListService() {
  return request.get<Result<UserVO[]>>(`/message/getMessageUserList`);
}


/**
 * 获取消息列表
 * @param {string} toId  对方用户名
 * @returns
 */
export function getMessageList(toId:string) {
  return request.get(`/message/getMessageList?toId=${toId}`);
}


/**
 * 两个空的聊天记录的用户添加一条空记录
 * @param {string} toId toId
 * @returns
 */
export function addEmptyMessageService(toId:string) {
  return request.post<Result<any>>(`/message/addEmptyMessage?toId=${toId}`);
}
